<% @stylesheets = ["managingTable"]
    @title = "Gestione prodotti" %>

<table class="managingTable">
  <caption>Prodotti presenti nel database</caption>
  <tr>
    <th>Name</th>
    <th>Kind</th>
    <th>Ingredients</th>
    <th>Price</th>
    <th>&nbsp;</th>
  </tr>

<% @products.each do |product| %>
  <tr>
    <td><%= product.name %></td>
    <td><%= product.kind %></td>
    <td><%= product.ingredients %></td>
    <td><%= product.price %></td>
    <td><%= link_to 'Edit', edit_admin_product_path(product) %>
        <%= link_to 'Destroy', admin_product_path(product), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<%= link_to 'New product', new_admin_product_path %>
